package com.ywm.entity;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


@ApiModel(value="Blog对象", description="博客")
@TableName("blog")
@Data
public class Blog implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "博客id")
    @TableId(type = IdType.ASSIGN_ID)
    private String blogId;

    @ApiModelProperty(value = "标题")
    private String blogTitle;

    @ApiModelProperty(value = "封面")
    private String blogImage;

    @ApiModelProperty(value = "内容")
    private String blogContent;

    @ApiModelProperty(value = "点赞数")
    private Integer blogGoods;

    @ApiModelProperty(value = "阅读数")
    private Integer blogRead;

    @ApiModelProperty(value = "收藏数")
    private Integer blogCollection;

    @ApiModelProperty(value = "博客类型")
    private String  blogType;

    @ApiModelProperty(value = "简介")
    private String blogRemark;

    @ApiModelProperty(value = "评论数")
    private Integer blogComment;

    @ApiModelProperty(value = "文档来源")
    private String blogSource;

    @ApiModelProperty(value = "作者")
    private String author;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastUpdateDate;

    @ApiModelProperty(value = "乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Integer isDeleted;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

}
